/*
 * @Descripttion: 编码规则
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2021-10-20 17:14:36
 */
import { axios } from "../../utils/request";

//单据编号设置 
const api = {
    pageList: "/erp/numberSet/pageList",
    save: "/erp/numberSet/save",
    list: "/erp/numberSet/list",
    parentList: "/erp/numberSet/parentList",
    remove: "/erp/numberSet/deleteById"
};

/**
 * 获取列表
 */
export function pageList (parameter) {
    return axios({
        url: api.pageList,
        method: "get",
        params: parameter,
        timeout: 500000,
    });
}


/**
 * 获取当前账套的单据编码简单结构
 */
export function list (parameter) {
    return axios({
        url: api.list,
        method: "post",
        data: parameter,
    });
}

/**
 * 获取当前账套的单据编码简单结构
 */
export function parentList (parameter) {
    return axios({
        url: api.parentList,
        method: "get",
        params: parameter,
    });
}

/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    });
}
/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.remove,
        method: "delete",
        params: data
    });
}
